package com.wuwie.article.controller;

import com.wuwie.article.entity.Comment;
import com.wuwie.article.service.CommentService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping;

import java.util.List;

@Controller
public class CommentTest {

    @Autowired
    private CommentService commentService;


    @RequestMapping("/")
    public String input(Model model){
        List<Comment> select = commentService.select();
        model.addAttribute("select",select);
        return "input";
    }
}
